﻿#region Regions

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;

using FMWare.Core.Databases;
using FMWare.Core.Translations;

#endregion

namespace FMWare.Test
{
	public partial class MainForm : Form
	{
		#region Constructors

		public MainForm()
		{
			InitializeComponent();
		}

		#endregion

		#region Event Handlers

		private void loadLanguagesButton_Click(object sender, EventArgs e)
		{
			//TODO: Check; Index is not exports -> shld be UniqueID

			Stopwatch stopwatch = Stopwatch.StartNew();
			//LanguageDatabase.DebugBinaryDumpPath = @"..\..\..\Databases\930\Dump\";
			//LanguageDatabase.DebugDataDumpPath = @"..\..\..\Databases\930\Dump\";
			LanguageDatabase.Load(@"..\..\..\Databases\930\", new List<SupportedLanguages> {SupportedLanguages.All});
			LanguageDatabase.LanguageDataReadCompleted += delegate
			                                              {
			                                              	long duration = stopwatch.ElapsedMilliseconds;
			                                              	MessageBox.Show("Language Database was loaded in " + duration + "ms");

			                                              };
		}

		#endregion
	}
}